﻿using System;
using System.Collections.Generic;
using SelfMadeMillionaire.Core.Entities;
using SelfMadeMillionaire.Core.Enums;

namespace SelfMadeMillionaire.Core.Services
{
	public interface ISubscriberService
	{
		Subscriber Get(int id);
		Subscriber Get(string email);
		Subscriber Get(Guid token);
        IEnumerable<Subscriber> GetByDeviceKey(string key);
        Subscriber GetByPasswordRecoveryKey(Guid key);
		void Add(Subscriber subscriber);
		void Update(Subscriber subscriber);
		bool IsExists(string email, int id);
		void Remove(int id);
		void Unsubscribe(int id);
		SubscriptionType GetMinAccessLevel(string email);

		Order GetOrder(string subscriberEmail);
        Order Order(string subscriberEmail, byte productId);
        void OrderWithPayment(string subscriberEmail, byte productId);
	    Order UpdateOrder(Order order);
	    Order GetOrderBySubscriberAndPromoCode(string subscriberEmail, string promocode);

		void Cancel(string subscriberEmail);
		void Activate(Subscriber subscriber);
        void CreatePasswordRecovery(Subscriber subscriber);

		void SubscribeMMM(Subscriber subscriber);
		void UnsubscribeMMM(Subscriber subscriber);
        void Unsubscribe(Subscriber subscriber);
        void UnsubscribeSP(string email);

		void SubscribeSMMFree(Subscriber subscriber);

        double GetSilverPricePackage();
        double GetGoldPricePackage();
        double GetPlatinumPricePackage();

		Product[] GetProducts(Subscriber subscriber);


        #region Mailing
        void UpdateMODetail_EmailOpen(string mailing);
        void UpdateMODetail_LandingOpen(string mailing);
        void UpdateMODetail_SubscribeRedirect(string mailing);
        void UpdateMODetail_SubscribeFinish(string mailing);
        #endregion
	}
}